Repository navigation
fix(gsa): leave out a parameter the reader never filled in, and record why the emails vanish - #237
Merged
Merged
Conversation
`submitQuery` mapped every parameter through `param.value + ''`. A parameter seeded from an absent `default` has `value: undefined`, and `undefined + ''` is the **string** `"undefined"` -- so an unfilled email was submitted as an address, and the analysis service was asked to deliver a report somewhere that cannot exist. Reports arrive, no mail does, and nothing anywhere says why. Found while establishing whose job the missing emails in #168 are. Delivery is GSA's -- there is no mailer in this repository -- and our submission path is otherwise correct: common parameters really are merged into the request, which was the obvious suspect and is not the problem. Unset parameters are now omitted. `false` and `0` are answers and are kept; only `undefined`, `null` and the empty string are absent. The rule is extracted and unit tested rather than driven through the service, which needs a store, an HttpClient and a config provider to construct -- none of which have anything to do with the decision. Proven to discriminate: against the old behaviour: 2 failed | 2 passed with the fix: 4 passed The two that pass either way are `false` and `0`, so they guard against over-filtering rather than restating the fix. This may or may not be what the curator hit; their address may have reached GSA perfectly well. That question belongs to GSA's logs, and asking is cheaper than submitting analyses to reproduce it. Refs #168. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two new records, in the shape 002 established: decision, why, what was rejected, and the measurement that settled it. **003 — the recorded backend for e2e tests.** Why tests replay recordings rather than calling a server, and the six decisions inside that: one recording per test rather than per spec (per-spec lost 13 of 18 entries in one file and all 9 in another), matching without the origin, recording the probe requests that were silently skipping fourteen tests, why the shared fallback is GET and HEAD only, why the release suite is never recorded, and what the trim keeps. **004 — how the site is built and served.** nginx replacing Apache and the CLOSE-WAIT measurement behind it, per-upstream keepalive from measured backend timeouts, moving nginx's config out of the git tree, Node 24, dropping `--legacy-peer-deps` by moving vitest, keeping the reader's selection when navigating, and omitting GSA parameters with no value. Both carry the figures rather than the conclusions, including two I got wrong first: that serial recording would fix the overwrite, and that dropping `--legacy-peer-deps` cost 207 version changes. Recorded as rejected options with the reason, because a wrong number that travelled for a day is worth writing down once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 18, 2026
adamjohnwright
added a commit
that referenced
this pull request
Sep 18, 2026
…ed (#242) * fix(gsa): stop submitting an address the form already knows is malformed Typing `adam@` into the E-Mail field on the options step submitted the analysis with that address, and no mail ever arrived. The form had already decided the value was invalid; it just never acted on it or said so. Two causes, both from the validator and the template identifying the field differently. The validator asked `type === 'email' || name.includes('email')`; the template switched on `type` alone. GSAServer sends the address as `type: "string"`, so the validator attached and the template rendered the plain-string branch -- which carries no `mat-error`. The message that would have explained the red field sat in a branch that never rendered, and nothing read `invalid` before the stepper advanced. Both now go through `isEmailParameter`, and the options step's Continue button is gated on every parameter being valid. The gate does not use `control` for validity. `control` updates on blur, which is too late to gate a button: clicking Continue blurs the input, so the blur and the click race, and in a zoneless app the re-render loses -- the click would land on a still-enabled button. A separate probe validates on each keystroke, so the field is marked and Continue disabled before any click. Deliberately not fixed by dropping the value in `submittedParameters()` alongside the blank one (#237). Silently discarding a typo'd address is worse than sending it, because the reader is left expecting mail. Blank addresses are unchanged and correct: omitted from the request since #237, and optional by the server's own description of the parameter. The server half of the missing-report-emails problem remains #168. The new spec covers the cause -- the type/name disagreement -- against the recorded payload, and was confirmed red against the old type-only predicate. The rendering is not covered: this component has an external templateUrl, which the vitest setup cannot compile. Refs #241 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(curators): correct the analysis-email note, which described a closed issue The note told curators we do not enforce the address and pointed at #238. #238 is closed as invalid -- `required` is never sent by GSAServer, so the remedy it proposed was a no-op, and the blank-address half it described was already fixed in #237. What is worth telling them is the opposite of what the note said: a blank address is fine and always was, and a *mistyped* one was the trap. Both now described as they actually behave. RELEASE-TESTING.md gains a manual row for the rendered message, with the reason it is manual rather than auto. Refs #241 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while establishing whose job the missing report emails in #168 are.
Read the correction first — the reasoning in my original description was wrong.
Who sends the mail
Not us. The address is a GSA method parameter;
reactome/gsa-backendsends. Thereis no SMTP, no mailer and no send anywhere in this repository.
Our submission path is otherwise correct, which I checked rather than assumed:
parameters are split into method-specific and
commonin the reducer, email iscommon, and the obvious failure would be common parameters never reaching the
request. They do reach it.
Correction: the
"undefined"case cannot happenI originally claimed an unfilled email was submitted as the string
"undefined", becausesubmitQuerymaps every parameter throughparam.value + ''.That is wrong.
reactome_analysis_api/methods.pydeclares all 15 parameterswith a default, and email's is the empty string:
Our form seeds
value: param.default, so an untouched email is"", and"" + ''is"".param.valueis neverundefinedby that path.Production has identical code. From
https://reactome.org/gsa/:Character for character ours — expected, since this was absorbed from
reactome/gsa-frontend, which is what production serves. So this is not aregression in the rewrite.
Why the emails actually vanish
reactome_analysis_worker.pyqueues a report when reports were asked for orthe address is longer than three characters, and passes the address either way:
then
reactome_analysis_report_generator.py:""is falsy. Reports are generated, the mail is skipped, and nothing tells thereader. That is exactly "reports actually seem ok but they weren't emailed".
What this PR is, honestly
Omitting valueless parameters is equivalent to the old behaviour from the
backend's point of view — the worker's
.get("email", "")treats absent and emptyidentically. So this fixes no bug. It is worth keeping because sending
""and"undefined"for things nobody filled in is nonsense to put on the wire, andfalse/0are answers and are kept — but it is tidying, not a fix, and theoriginal description overclaimed.
The question that would actually settle #168
Did the curator's address ever reach the request? Nothing on our side checks
the box was filled,
Parameter.requiredis declared and never enforced, andlen > 3makes empty and absent indistinguishable. That is answerable from GSA'slogs and not from here.
Also carries
specs/003andspecs/004, recording today's decisions in the shape002established.Refs #168.
🤖 Generated with Claude Code